/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/04/08
\**********************/
#include "LuaRegister.h"
#include "Base/LuaHelper.h"
#include "Base/LuaBase.h"

#include "Core/LuaEngine.h"
#include "Core/LuaWindow.h"
#include "Core/LuaControl.h"
#include "Core/LuaContainer.h"

#include "Layout/LuaHorizontalLayout.h"
#include "Layout/LuaVerticalLayout.h"
#include "Layout/LuaTabLayout.h"
#include "Layout/LuaTileLayout.h"
#include "Layout/LuaChildLayout.h"
#include "Layout/LuaAnimationTabLayout.h"

#include "Control/Text/LuaLabel.h"
#include "Control/Text/LuaText.h"
#include "Control/Text/LuaRollText.h"

#include "Control/Button/LuaButton.h"
#include "Control/Button/LuaFadeButton.h"
#include "Control/Button/LuaOption.h"
#include "Control/Button/LuaCheckBox.h"

#include "Control/Edit/LuaEdit.h"
#include "Control/Edit/LuaRichEdit.h"

#include "Control/Progress/LuaProgress.h"
#include "Control/Progress/LuaScrollBar.h"
#include "Control/Progress/LuaSlider.h"

#include "Control/List/LuaList.h"
#include "Control/List/LuaListContainerElement.h"
#include "Control/List/LuaListElement.h"
#include "Control/List/LuaListHeader.h"
#include "Control/List/LuaListHeaderItem.h"
#include "Control/List/LuaListLabelElement.h"
#include "Control/List/LuaListTextElement.h"
#include "Control/List/LuaListEx.h"
#include "Control/List/LuaListContainerHeaderItem.h"
#include "Control/List/LuaListTextExtElement.h"

#include "Control/Combo/LuaCombo.h"
#include "Control/Combo/LuaComboBox.h"

#include "Control/Tree/LuaTreeNode.h"
#include "Control/Tree/LuaTreeView.h"

#include "Control/Menu/LuaMenu.h"
#include "Control/Menu/LuaMenuElement.h"

#include "Control/Anmi/LuaGifAnim.h"
#include "Control/Anmi/LuaGifAnimEx.h"

#include "Control/IP/LuaIPAddress.h"
#include "Control/IP/LuaIPAddressEx.h"

#include "Control/ActiveX/LuaActiveX.h"
#include "Control/ActiveX/LuaFlash.h"
#include "Control/ActiveX/LuaWebBrowser.h"

#include "Control/Other/LuaDateTime.h"
#include "Control/Other/LuaGroupBox.h"
#include "Control/Other/LuaColorPalette.h"
#include "Control/Other/LuaHotKey.h"
#include "Control/Other/LuaRing.h"

namespace DuiLib {

void RegisterAll(LuaState* L)
{
    LuaHelper::Register(L);

    LuaBase::RegisterBase(L);
    LuaBase::RegisterConvert(L);
    LuaBase::RegisterDefine(L);

    LuaEngine::Register(L);
    LuaWindow::Register(L);
    LuaControl::Register(L);
    LuaContainer::Register(L);

    LuaHorizontalLayout::Register(L);
    LuaVerticalLayout::Register(L);
    LuaTabLayout::Register(L);
    LuaTileLayout::Register(L);
    LuaChildLayout::Register(L);
    LuaAnimationTabLayout::Register(L);

    LuaLabel::Register(L);
    LuaText::Register(L);
    LuaRollText::Register(L);

    LuaButton::Register(L);
    LuaFadeButton::Register(L);
    LuaOption::Register(L);
    LuaCheckBox::Register(L);

    LuaEdit::Register(L);
    LuaRichEdit::Register(L);

    LuaProgress::Register(L);
    LuaScrollBar::Register(L);
    LuaSlider::Register(L);

    LuaList::Register(L);
    LuaListContainerElement::Register(L);
    LuaListElement::Register(L);
    LuaListHeader::Register(L);
    LuaListHeaderItem::Register(L);
    LuaListLabelElement::Register(L);
    LuaListTextElement::Register(L);
    LuaListEx::Register(L);
    LuaListContainerHeaderItem::Register(L);
    LuaListTextExtElement::Register(L);

    LuaCombo::Register(L);
    LuaComboBox::Register(L);

    LuaTreeNode::Register(L);
    LuaTreeView::Register(L);

    LuaMenu::Register(L);
    LuaMenuElement::Register(L);

    LuaGifAnim::Register(L);
#ifdef USE_XIMAGE_EFFECT
    LuaGifAnimEx::Register(L);
#endif

    LuaIPAddress::Register(L);
    LuaIPAddressEx::Register(L);

    LuaActiveX::Register(L);
    LuaFlash::Register(L);
    LuaWebBrowser::Register(L);

    LuaDateTime::Register(L);
    LuaGroupBox::Register(L);
    LuaColorPalette::Register(L);
    LuaHotKey::Register(L);
    LuaRing::Register(L);
    
}

void UnRegisterAll(LuaState* L)
{
    
    LuaRing::UnRegister(L);
    LuaHotKey::UnRegister(L);
    LuaColorPalette::UnRegister(L);
    LuaGroupBox::UnRegister(L);
    LuaDateTime::UnRegister(L);

    LuaWebBrowser::UnRegister(L);
    LuaFlash::UnRegister(L);
    LuaActiveX::UnRegister(L);

    LuaIPAddressEx::UnRegister(L);
    LuaIPAddress::UnRegister(L);

#ifdef USE_XIMAGE_EFFECT
    LuaGifAnimEx::UnRegister(L);
#endif
    LuaGifAnim::UnRegister(L);

    LuaMenuElement::UnRegister(L);
    LuaMenu::UnRegister(L);

    LuaTreeView::UnRegister(L);
    LuaTreeNode::UnRegister(L);

    LuaComboBox::UnRegister(L);
    LuaCombo::UnRegister(L);

    LuaListTextExtElement::UnRegister(L);
    LuaListContainerHeaderItem::UnRegister(L);
    LuaListEx::UnRegister(L);
    LuaListTextElement::UnRegister(L);
    LuaListLabelElement::UnRegister(L);
    LuaListHeaderItem::UnRegister(L);
    LuaListHeader::UnRegister(L);
    LuaListElement::UnRegister(L);
    LuaListContainerElement::UnRegister(L);
    LuaList::UnRegister(L);

    LuaSlider::UnRegister(L);
    LuaScrollBar::UnRegister(L);
    LuaProgress::UnRegister(L);
    
    LuaRichEdit::UnRegister(L);
    LuaEdit::UnRegister(L);

    LuaCheckBox::UnRegister(L);
    LuaOption::UnRegister(L);
    LuaFadeButton::UnRegister(L);
    LuaButton::UnRegister(L);

    LuaRollText::UnRegister(L);
    LuaText::UnRegister(L);
    LuaLabel::UnRegister(L);

    LuaAnimationTabLayout::UnRegister(L);
    LuaChildLayout::UnRegister(L);
    LuaTileLayout::UnRegister(L);
    LuaTabLayout::UnRegister(L);
    LuaVerticalLayout::UnRegister(L);
    LuaHorizontalLayout::UnRegister(L);

    LuaContainer::UnRegister(L);
    LuaControl::UnRegister(L);
    LuaWindow::UnRegister(L);
    LuaEngine::UnRegister(L);

    LuaBase::UnRegisterDefine(L);
    LuaBase::UnRegisterConvert(L);
    LuaBase::UnRegisterBase(L);
    
    LuaHelper::UnRegister(L);
}

}